package jrain.iot.server.mqtt.business;

import jrain.fw.core.business.Business;
import jrain.fw.core.business.BusinessMethod;
import jrain.fw.core.business.BusinessRequest;
import jrain.fw.core.business.BusinessResponse;
import jrain.fw.core.log.Logger;
import jrain.fw.core.log.LoggerFactory;
import jrain.iot.server.mqtt.consts.MqttConst;
import jrain.utils.lang.StringUtils;

@Business(name = "MqttSimplePingService")
public class MqttSimplePingService {

	private static final BusinessResponse response = new BusinessResponse();
	private static Logger logger = LoggerFactory.getLogger(MqttSimplePingService.class);

	@BusinessMethod
	public BusinessResponse ping(BusinessRequest request) {
		String userName = StringUtils.trimNull(request.getData(MqttConst.USER_NAME));
		logger.trace(request, "ping==,userName={}", userName);
		return response;
	}
}
